import request from '../utils/request';
import { cloud } from '../utils/config';

export async function create(payload){
  return request(`${cloud}/quotation`,{
    method:'post',
    body:JSON.stringify(payload),
    data:JSON.stringify(payload),
  })
}

export async function queryAll () {
  return request(`${cloud}/quotation`,{
      method: 'get',
    }
  )
}

export async function query (payload) {
  return request(`${cloud}/quotation/query${id}`,{
      method: 'get',
    }
  )
}

export async function modify (payload){
  return request(`${cloud}/quotation`,{
    method:'put',
    body:JSON.stringify(payload),
    data:JSON.stringify(payload),
  })
}

export async function deleteAll(data) {
  return request (`${cloud}/quotation`,{
    method:'delete',
    body:JSON.stringify(data),
    data:JSON.stringify(data),
  })
}

export async function remove (id) {
  return request(`${cloud}/payer/delete/:${id}`,{
      method: 'delete',
      // body:JSON.stringify(data)
    }
  )
}
